<template>
  <div class="home-wrap">
    <div class="home-con">
      <div class="show-title">
        <span>摄像机列表</span>
      </div>
      <!-- 搜索 -->
      <div class="search-box">
        <el-input
          :placeholder="placeholder"
          v-model="input"
          class="input-with-select"
        >
          <el-select
            v-model="select"
            slot="prepend"
            style="width: 150px"
            placeholder="请选择"
          >
            <el-option label="名称" value="1"></el-option>
            <el-option label="国标编码" value="2"></el-option>
            <el-option label="序列号" value="3"></el-option>
          </el-select>
          <el-button
            slot="append"
            icon="el-icon-search"
            @click="fnSearch"
          ></el-button>
          <i
            slot="suffix"
            class="el-input__icon el-icon-circle-close"
            @click="FnAll()"
          ></i>
        </el-input>
      </div>
      <!-- 列表 -->
      <el-table
        ref="table"
        :data="tableData"
        border
        style="width: 100%"
        stripe
        @selection-change="handleSelectionChange"
        @sort-change="changeSort"
        :row-key="getRowKeys"
        :cell-style="cellStyle"
      >
        <!-- 根据config.js中toCompany字段判断，不同公司列表顺序不一样，sugon是一种，汉邦和蜀天是一种 -->
        <template v-if="globalToCompany == 'sugon'">
          <el-table-column
            type="selection"
            width="40"
            align="center"
            :reserve-selection="true"
            :key="1"
            fixed
          ></el-table-column>
          <el-table-column
            sortable
            prop="sn_gb28181"
            label="国标编码"
            width="230"
            align="left"
            :key="2"
            fixed
          >
            <template slot-scope="scope">
              <div class="flex-box">
                <div
                  :class="{
                    red: scope.row.online == 0,
                    green: scope.row.online == 1,
                    gray: scope.row.online == -1,
                  }"
                ></div>
                <div>
                  {{ scope.row.sn_gb28181 ? scope.row.sn_gb28181 : "-" }}
                </div>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            label="下级平台"
            prop="sub_platform_num"
            width="200"
            align="center"
            :key="3"
          >
            <template slot-scope="scope">{{
              scope.row.sub_platform_num
                ? scope.row.sub_platform_num
                : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="别称"
            prop="alias"
            min-width="160"
            align="center"
            :key="4"
          >
            <template slot-scope="scope">{{
              scope.row.alias ? scope.row.alias : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="原名称"
            prop="name"
            min-width="160"
            align="center"
            :key="5"
          >
            <template slot-scope="scope">{{
              scope.row.name ? scope.row.name : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="所属部门"
            prop="department"
            min-width="160"
            align="center"
            :key="6"
          >
            <template slot-scope="scope">{{
              scope.row.department ? scope.row.department : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="分组"
            prop="stream_from"
            min-width="240"
            align="center"
            :key="7"
          >
            <template slot-scope="scope">
              <block v-if="scope.row.orgs.length > 0">
                <div v-for="(item, index) in scope.row.orgs" :key="index">
                  {{
                    item.gfather_name +
                    " - " +
                    item.father_name +
                    " - " +
                    item.org_name
                  }}
                </div>
              </block>
              <block v-else>-</block>
            </template>
          </el-table-column>
          <el-table-column
            label="设备地址"
            prop="domain"
            min-width="180"
            align="center"
            :key="13"
          >
            <template slot-scope="scope">{{
              scope.row.domain ? scope.row.domain : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="主源地址"
            prop="stream_from"
            min-width="180"
            align="center"
            :key="8"
          >
            <template slot-scope="scope">{{
              scope.row.stream_from
            }}</template>
          </el-table-column>
          <el-table-column
            sortable
            prop="sn"
            label="序列号"
            min-width="200"
            align="center"
            :key="9"
          >
            <template slot-scope="scope">{{ scope.row.sn }}</template>
          </el-table-column>
          <el-table-column
            sortable
            label="视频链接"
            min-width="150"
            align="center"
            v-if="permissionData.hideURLArr.length < 2"
            :key="11"
          >
            <template slot-scope="scope">
              <span>
                <el-button
                  type="text"
                  v-permissions="{
                    url: ['device/stream/live/url/ticket/no'],
                    index: scope.$index,
                    key: 'hideURL',
                    id: 'wupiao',
                  }"
                  @click="handleVideoLink1(scope.row)"
                  >无票URL</el-button
                >
                <el-button
                  v-permissions="{
                    url: ['device/stream/live/ticket/list'],
                    index: scope.$index,
                    key: 'hideURL',
                    id: 'youpiao',
                  }"
                  type="text"
                  @click="handleVideoLink2(scope.row)"
                  >有票URL</el-button
                >
              </span>
            </template>
          </el-table-column>
        </template>
        <!-- 根据config.js中toCompany字段判断，不同公司列表顺序不一样，sugon是一种，汉邦和蜀天是一种 -->
        <template v-else-if="globalToCompany == 'hanbang' || 'shutian' || ''">
          <el-table-column
            type="selection"
            width="40"
            align="center"
            :reserve-selection="true"
            :key="1"
            fixed
          ></el-table-column>
          <el-table-column
            sortable
            prop="sn"
            label="序列号"
            min-width="280"
            align="center"
            :key="9"
            fixed
          >
            <!-- <template slot-scope="scope">{{ scope.row.sn }}</template> -->
            <template slot-scope="scope">
              <div class="flex-box">
                <div
                  :class="{
                    red: scope.row.online == 0,
                    green: scope.row.online == 1,
                    gray: scope.row.online == -1,
                  }"
                ></div>
                <div>
                  {{ scope.row.sn ? scope.row.sn : "-" }}
                </div>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            label="别称"
            prop="alias"
            min-width="160"
            align="center"
            :key="4"
          >
            <template slot-scope="scope">{{
              scope.row.alias ? scope.row.alias : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="原名称"
            prop="name"
            min-width="160"
            align="center"
            :key="5"
          >
            <template slot-scope="scope">{{
              scope.row.name ? scope.row.name : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            sortable
            label="视频链接"
            min-width="150"
            align="center"
            v-if="permissionData.hideURLArr.length < 2"
            :key="11"
          >
            <template slot-scope="scope">
              <span>
                <el-button
                  type="text"
                  v-permissions="{
                    url: ['device/stream/live/url/ticket/no'],
                    index: scope.$index,
                    key: 'hideURL',
                    id: 'wupiao',
                  }"
                  @click="handleVideoLink1(scope.row)"
                  >无票URL</el-button
                >
                <el-button
                  v-permissions="{
                    url: ['device/stream/live/ticket/list'],
                    index: scope.$index,
                    key: 'hideURL',
                    id: 'youpiao',
                  }"
                  type="text"
                  @click="handleVideoLink2(scope.row)"
                  >有票URL</el-button
                >
              </span>
            </template>
          </el-table-column>
          <el-table-column
            label="分组"
            prop="stream_from"
            min-width="240"
            align="center"
            :key="7"
          >
            <template slot-scope="scope">
              <block v-if="scope.row.orgs.length > 0">
                <div v-for="(item, index) in scope.row.orgs" :key="index">
                  {{
                    item.gfather_name +
                    " - " +
                    item.father_name +
                    " - " +
                    item.org_name
                  }}
                </div>
              </block>
              <block v-else>-</block>
            </template>
          </el-table-column>
          <el-table-column
            label="设备地址"
            prop="domain"
            min-width="180"
            align="center"
            :key="13"
          >
            <template slot-scope="scope">{{
              scope.row.domain ? scope.row.domain : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="主源地址"
            prop="stream_from"
            min-width="180"
            align="center"
            :key="8"
          >
            <template slot-scope="scope">{{
              scope.row.stream_from
            }}</template>
          </el-table-column>
          <el-table-column
            sortable
            prop="sn_gb28181"
            label="国标编码"
            width="230"
            align="left"
            :key="2"
          >
            <!-- <template slot-scope="scope">
              <div class="flex-box">
                <div
                  :class="{
                    red: scope.row.online == 0,
                    green: scope.row.online == 1,
                    gray: scope.row.online == -1,
                  }"
                ></div>
                <div>
                  {{ scope.row.sn_gb28181 ? scope.row.sn_gb28181 : "-" }}
                </div>
              </div>
            </template> -->
            <template slot-scope="scope"> {{ scope.row.sn_gb28181 ? scope.row.sn_gb28181 : "-" }}</template>
          </el-table-column>
          <el-table-column
            label="下级平台"
            prop="sub_platform_num"
            width="200"
            align="center"
            :key="3"
          >
            <template slot-scope="scope">{{
              scope.row.sub_platform_num
                ? scope.row.sub_platform_num
                : "-"
            }}</template>
          </el-table-column>
          <el-table-column
            label="所属部门"
            prop="department"
            min-width="160"
            align="center"
            :key="6"
          >
            <template slot-scope="scope">{{
              scope.row.department ? scope.row.department : "-"
            }}</template>
          </el-table-column>
        </template>
        <!-- 操作 -->
        <el-table-column
          class="play-box"
          label="操作"
          min-width="280"
          align="center"
          fixed="right"
          v-if="permissionData.hideActionArr.length < 4"
        >
          <template slot-scope="scope">
            <el-button
              v-permissions="{
                url: ['device/org/list', 'device/org/set'],
                index: scope.$index,
                key: 'hideAction',
                id: 'org',
              }"
              size="small"
              type="success"
              @click="orgFn(scope.$index, scope.row)"
              >分组</el-button
            >

            <el-button
              v-permissions="{
                url: ['device/location/get'],
                index: scope.$index,
                key: 'hideAction',
                id: 'location',
              }"
              size="small"
              type="primary"
              @click="goCameraDetail(scope.row)"
              >位置</el-button
            >
            <el-button
              v-permissions="{
                url: ['device/update'],
                index: scope.$index,
                key: 'hideAction',
                id: 'update',
              }"
              size="small"
              type="warning"
              @click="modifyFn(scope.$index, scope.row)"
              >修改</el-button
            >
            <el-button
              v-permissions="{
                url: ['device/delete'],
                index: scope.$index,
                key: 'hideAction',
                id: 'delete',
              }"
              size="small"
              type="danger"
              @click="delRow(scope.$index, scope.row)"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <!--分页-->
      <el-pagination
        right
        background
        layout="total,prev, pager, next, sizes,jumper"
        :page-size="pagesize"
        :page-sizes="pageSizesArr"
        :total="total"
        @current-change="handleCurrentChange"
        @size-change="handleSizeChange"
      ></el-pagination>
      <!--批量删除全部设备  -->
      <div class="batch-btn-con">
        <el-button
          class="batchDelect"
          type="success"
          plain
          @click="batchSet"
          v-permissions="{
            url: ['device/update/department'],
            hasDisplay: true,
          }"
          >批量设置所属部门</el-button
        >
        <el-button
          class="batchDelect"
          type="danger"
          plain
          @click="batchDelete"
          v-permissions="{
            url: ['device/delete'],
            hasDisplay: true,
          }"
          >批量删除</el-button
        >
        <el-button
          class="batchDelect"
          type="primary"
          plain
          @click="batchNotify"
          v-permissions="{
            url: ['device/register/notify'],
            hasDisplay: true,
          }"
          >设备注册通知</el-button
        >
        <el-link
          class="tips"
          :underline="false"
          type="info"
          icon="el-icon-warning-outline"
          >国标编码中摄像机状态，绿色代表在线、红色代表离线、灰色代表已取消。</el-link
        >
      </div>
    </div>
    <div
      class="home-con"
      v-permissions="{
        url: ['device/register'],
        hasDisplay: true,
      }"
    >
      <!--添加  -->
      <div class="show-title">
        <span>添加摄像机</span>
      </div>
      <CameraAddForm @refreshTableList="refresh"></CameraAddForm>
      <!--导入 ,先注释掉了 -->
      <!-- <div class="show-title">
        <span>导入摄像机位置数据</span>
      </div>
      <CameraImportData @refreshTableList="refresh"></CameraImportData> -->
    </div>

    <!-- 点击分组，弹出框 -->
    <CamerOrgPopup
      v-if="dialogVisible_org.show"
      :dialogVisible_org="dialogVisible_org"
      :sn="sn"
      :name="name"
      @refreshTabeList="refreshTabeList"
    />
    <!-- 点击修改，弹出框 -->
    <CameraModify
      v-if="dialogVisible.show"
      :dialogVisible="dialogVisible"
      :sn="sn"
      @refreshList="refreshModify"
    />
    <!-- 批量设置所属部门，弹出框 -->
    <modifyDeptment
      v-if="dialogVisible_dep.show"
      :dialogVisible_dep="dialogVisible_dep"
      :batchDelectId="batchDelectId"
      @refreshList="refresh"
    />
  </div>
</template>

<script>
import axios from "axios";
import { getData, postData } from "@/request/http";
import { getYMDHMS, tempToTime2 } from "@/utils/Tool";
import CameraAddForm from "./coms/CameraAddForm";
import CameraImportData from "./coms/CameraImportData";
import CamerOrgPopup from "./coms/CamerOrgPopup";
import CameraModify from "./coms/CameraModify";
import modifyDeptment from "./coms/modifyDeptment";
export default {
  name: "list",
  components: {
    CameraAddForm,
    CameraImportData,
    CameraModify,
    CamerOrgPopup,
    modifyDeptment,
  },
  props: {},
  data() {
    return {
      placeholder: "", //搜索中placeholder
      select: "", //搜索中select
      input: "", //搜索中input
      total: 0, // 总数
      currpage: 1, //当前页
      pagesize: globalPageSizes[0], //初始显示，一页几个
      pageSizesArr: globalPageSizes, //globalPageSizes在public--config中全局配置，每页显示个数数组      total: 0, // 总数
      tableData: [], // 表格数据
      tableChecked: [], // 多选
      batchDelectId: [], //批量删除id
      // sn: "",
      checkAll: false, // 是否全选状态
      org_arr: [],
      delBtnShow: false,
      //分组弹窗
      dialogVisible_org: {
        show: false,
      },
      //修改弹出框
      dialogVisible: {
        show: false,
      },
      //批量设置所属部门，弹出框
      dialogVisible_dep: {
        show: false,
      },
      sn: "", //打开弹窗，当前行id
      name: "",
      limited_value_show: "",
      permissionData: {
        hideActionArr: [], // 注意这里数组命名，hideAction对应key: 'hideAction',，后面加上Arr【必须这样命名，否则指令获取不到数组】,另外id也要不一样
        hideURLArr: [], //有票无票的隐藏
        hideTotalFlowArr: [], //细分流量的隐藏
        hideSubFlowArr: [], //细分流量的隐藏
      },
      globalToCompany: "",
    };
  },
  computed: {},
  created() {
    //判断公司
    this.fn_toCompany();
  },
  mounted() {
    this.search();
    if (this.select == 1) {
      this.placeholder = "请输入名称";
    } else if (this.select == 2) {
      this.placeholder = "请输入国标编码";
    } else if (this.select == 3) {
      this.placeholder = "请输入序列号";
    } else {
      this.placeholder = "请输入";
    }
  },
  methods: {
    //判断公司
    fn_toCompany() {
      this.globalToCompany = window.toCompany;
    },
    //转换列表中限制值
    getTimeRemain(time) {
      let result = getYMDHMS(time);
      return result;
    },
    //转换列表中限制值
    getTempToTime(time) {
      let result = tempToTime2(time);
      return result;
    },
    //table第一列小手样式，跟上边注释的总流量，细分流量，流量值对应
    //this.permissionData.hideFlow < 1 是判断在子账户中，有删除列的时候，颜色和小手去掉
    cellStyle(row) {
      /* if (this.permissionData.hideURLArr.length < 1) {
        if (row.columnIndex === 9 || row.columnIndex === 11) {
          return "color:#3182bd;cursor: pointer";
        }
      }
      this.permissionData.hideFlow < 1; */
    },

    refresh() {
      this.search();
    },
    refreshModify() {
      setTimeout(() => {
        this.dialogVisible = { show: false };
        this.search();
      }, 1000);
    },
    // 搜索
    async fnSearch() {
      let { input, select } = this;
      this.currpage = 1;

      if (input == "") {
        this.$message.error("请输入内容");
        return;
      }
      this.search();
    },
    search() {
      let dataParams = {};
      if (this.select == 1) {
        dataParams = {
          with_limited: 1,
          with_details: 1,
          with_org: 1,
          with_online: 1,
          page: this.currpage,
          page_num: this.pagesize,
          name_like: this.input,
        };
      } else if (this.select == 2) {
        dataParams = {
          with_limited: 1,
          with_details: 1,
          with_org: 1,
          with_online: 1,
          page: this.currpage,
          page_num: this.pagesize,
          sn28181_like: this.input,
        };
      } else if (this.select == 3) {
        dataParams = {
          with_limited: 1,
          with_details: 1,
          with_org: 1,
          with_online: 1,
          page: this.currpage,
          page_num: this.pagesize,
          sn_like: this.input,
        };
      } else {
        dataParams = {
          with_limited: 1,
          with_details: 1,
          with_org: 1,
          with_online: 1,
          page: this.currpage,
          page_num: this.pagesize,
        };
      }
      postData("/adminweb/sys/admin/device/list", dataParams)
        .then((res) => {
          // console.log(res);
          if (res.code == 0) {
            if (!res.datas || !res.datas.devices) {
              return;
            }
            let devices = res.datas.devices;
            this.org_arr = devices.orgs;
            this.tableData = devices;
            this.total = res.datas.total_count;
            //console.log(this.tableData);
          } else if (res.code == -56055) {
            return;
          } else {
            this.$message.error(res.code + "，" + res.msg);
          }
        })
        .catch((res) => {
          this.$message.error("error");
        });
    },
    //全部
    FnAll() {
      this.currpage = 1;
      this.input = "";
      this.select = "";
      this.search();
    },

    // 获取row的key值
    getRowKeys(row) {
      return row.sn;
    },
    //点击 第几页
    handleCurrentChange(cpage) {
      this.currpage = cpage;
      this.search();
    },
    //每页有几条
    handleSizeChange(psize) {
      this.currpage = 1;
      this.pagesize = psize;
      this.search();
    },
    //操作多选
    handleSelectionChange(val) {
      var that = this;
      this.batchDelectId = [];
      that.tableChecked = val;
      //  console.log(that.tableChecked);
      if (val.length > 0) {
        for (let i = 0; i < val.length; i++) {
          this.batchDelectId.push(val[i]["sn"]);
        }
      }
    },
    //排序
    changeSort(val) {
      //val.order = ascending上升    descending下降
      //  console.log(val);
    },
    //删除单行
    delRow(index, rows) {
      // console.log(index, rows);
      var subArr = [];
      subArr.push(rows.sn);
      var that = this;
      that
        .$confirm("此操作将删除:" + rows.name + ", 是否继续?", "删除", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
        .then(() => {
          postData("/adminweb/device/delete", {
            devices: subArr,
          })
            .then((res) => {
              //console.log(res);
              if (res.code == 0) {
                that.$message.success("删除成功");
                that.search();
              } else if (res.code == -56055) {
                return;
              } else {
                that.$message.error("删除失败");
              }
            })
            .catch((res) => {
              that.$message.error(res);
            });
        })
        .catch((res) => {
          that.$message.success("已取消");
        });
    },
    refreshTabeList() {
      this.search();
    },
    //点击，无票URL
    handleVideoLink1(val) {
      var sn = val.sn;
      var name = val.name;
      this.$router.push({
        path: "/camera/applyBills_no",
        query: { sn: sn, name: name },
      });
    },
    //点击，有票URL
    handleVideoLink2(val) {
      var sn = val.sn;
      var name = val.name;
      this.$router.push({
        path: "/camera/applyBills",
        query: { sn: sn, name: name },
      });
    },
    //点击列表的序列号，跳转到ydtBox/ydtDeviceList盒子挂载设备列表
    goCameraDetail(val) {
      var sn = val.sn;
      var alias = val.alias;
      this.$router.push({
        path: "/camera/cameraDetail",
        query: { sn: sn, alias: alias },
      });
    },
    //点击，总 流量限制类型
    goTotalFlow(val) {
      var sn = val.sn;
      this.$router.push({
        path: "/hostList/TotalFlow",
        query: { sn: sn },
      });
    },
    //点击，分 流量限制类型
    goSubFlow(val) {
      var sn = val.sn;
      this.$router.push({
        path: "/hostList/SubFlow",
        query: { sn: sn },
      });
    },
    //点击分组按钮，弹窗
    orgFn(index, row) {
      this.dialogVisible_org = { show: true };
      this.sn = row.sn;
      this.name = row.name;
    },
    //点击修改按钮，弹窗
    modifyFn(index, row) {
      this.dialogVisible = { show: true };
      this.sn = row.sn;
    },
    submitData() {
      return this.$store.state.submitData;
    },
    //批量设置所属部门,弹窗
    batchSet(index, row) {
      if (this.batchDelectId.length == 0) {
        this.$message.error("请先勾选要批量操作的行");
        return;
      }
      this.dialogVisible_dep = { show: true };
    },
    //批量删除
    batchDelete() {
      if (this.batchDelectId.length == 0) {
        this.$message.error("请先勾选要批量操作的行");
        return;
      }
      var that = this;
      that
        .$confirm("此操作将批量删除, 是否继续?", "删除", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
        .then(() => {
          postData("/adminweb/device/delete", {
            devices: that.batchDelectId,
          })
            .then((res) => {
              if (res.code == 0) {
                that.$message.success("删除成功");

                that.$refs.table.clearSelection();
                that.search();
              } else {
                that.$message.error("删除失败");
              }
            })
            .catch((res) => {
              that.$message.error(res);
            });
        })
        .catch((res) => {
          that.$message.success("已取消");
        });
    },
    //批量-通知第三方注册设备
    batchNotify() {
      if (this.batchDelectId.length == 0) {
        this.$message.error("请先勾选要批量操作的行");
        return;
      }
      var that = this;
      that
        .$confirm("此操作将批量操作, 是否继续?", "通知第三方注册设备", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
        .then(() => {
          postData("/adminweb/device/register/notify", {
            devices: that.batchDelectId,
          })
            .then((res) => {
              if (res.code == 0) {
                that.$message.success("成功");

                that.$refs.table.clearSelection();
                that.search();
              } else {
                that.$message.error("失败");
              }
            })
            .catch((res) => {
              that.$message.error(res);
            });
        })
        .catch((res) => {
          that.$message.success("已取消");
        });
    },
  },
  watch: {
    //刷新table
    submitData(newVal, oldVal) {
      if (newVal != oldVal) {
        this.getList();
        this.currpage = 1;
      }
    },
  },
};
</script>
<style scoped>
.home-wrap {
}
.home-con {
  background: #fff;
  padding: 10px;
  margin-bottom: 30px;
  overflow: hidden;
}
.home-wrap >>> .el-pagination {
  float: right;
  margin-top: 30px;
}
.searchBox {
  margin-bottom: 20px;
}

/*标题*/
.show-title {
  width: 100%;
  height: 40px;
  line-height: 40px;
  position: relative;
  background: #c0dee2;
  padding-left: 15px;
  font-size: 14px;
  margin: 6px 0 20px 0;
  border-radius: 10px 10px 0 0;
  font-weight: bold;
}

.show-title::before {
  content: "";
  width: 2px;
  height: 16px;
  background: #676a6d;
  position: absolute;
  top: 12px;
  left: 27px;
}

.show-title span {
  float: left;
  color: #676a6d;
  margin-left: 25px;
}
.show-title .manual-refresh {
  float: right;
  margin-right: 20px;
}
.search-box {
  margin: 15px 0;
  width: 50%;
}
/* ip列表 */
.cameraList {
  margin-top: 35px;
  /* padding: 0 20px; */
}

/* 更改form表单默认样式,表头 */
.home-wrap >>> .el-table--border th,
.el-table__fixed-right-patch {
  /* background: #c0dee2; */
  background: #f0f3f4;
}

.home-wrap >>> .el-table .cell,
.el-table--border td:first-child .cell,
.el-table--border th:first-child .cell {
  padding-left: 10px;
  text-align: center;
}
.home-wrap >>> .demo-form-inline {
  width: 96%;
  margin: 0 auto;
  margin-top: 35px;
  box-sizing: border-box;
}
.ip-del-btn {
  color: #f13636;
}

/* 分页*/
.block {
  margin: 20px 0 0 10px;
}

.home-wrap >>> .el-icon-video-play {
  font-size: 20px !important;
  z-index: 990;
}
.home-wrap >>> .el-link--inner {
  font-size: 13px;
}

.home-wrap >>> .tips {
  margin-top: 10px;
  display: block;
  font-size: 18px;
}
.batch-btn-con {
  background: #fff;
  margin-top: 50px;
  margin-bottom: 30px;
  padding-left: 20px;
}

.upload {
  margin-left: 10px;
}
.flex-box {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.red {
  color: red;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f13636;
  margin-right: 10px;
}
.green {
  color: rgb(35, 235, 35);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgb(35, 235, 35);
  margin-right: 10px;
}
.gray {
  color: rgb(107, 107, 101);
   width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  margin-right: 10px;
}
</style>
